package cn.xfdzx.android.apps.shop.contract;

import java.util.Map;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.BaseObjectBean;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.LoginBean;
import cn.xfdzx.android.apps.shop.bean.MoreGoodsBean;
import cn.xfdzx.android.apps.shop.bean.ShopCarListBeen;
import cn.xfdzx.android.apps.shop.bean.ShopGoodListBeen;
import cn.xfdzx.android.apps.shop.bean.ShopRemakeListRetailBean;
import cn.xfdzx.android.apps.shop.bean.StoreInfoBeen;
import cn.xfdzx.android.apps.shop.bean.XFDGoodsDetailsBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface ShopRetailContract {
    interface Model {
        Flowable<ShopGoodListBeen> shopRetail(String shopId);
        Flowable<StoreInfoBeen> shopStoreInfo(String shopId, String sales_model);
        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);
        Flowable<ShopCarListBeen> shopCarList(String store_id,String index_status);
        Flowable<BaseObjectBean> updateCarNum(String id,String number);
        Flowable<BaseObjectBean> removeGood(String  ids);

        Flowable<XFDGoodsDetailsBeen> initData(String good_id);

        Flowable<ConfirmGoodBeen> confirm(String  cartId,String  user_curent_lng,String  user_curent_lat);

        //零售商品详情-推荐商品
        Flowable<MoreGoodsBean> getStoreGoodsList(Map<String,Object> map);

        //收藏商品
        Flowable<MoreGoodsBean> getGoodsCollection(Map<String,Object> map);

        //取消收藏商品
        Flowable<MoreGoodsBean> getGoodsCancleCollection(Map<String,Object> map);

        //关注店铺
        Flowable<StoreInfoBeen> getFocusShop(String storeid);

        Flowable<ShopRemakeListRetailBean> getShopRemakeRetail(Map<String,Object> map);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onShopRetailSuccess(ShopGoodListBeen bean);
        void onShopStoreInfoSuccess(StoreInfoBeen bean);
        void onAddCarSuccess(ConfirmGoodBeen bean);
        void onShopCarListSuccess(ShopCarListBeen bean);
        void onUpdateCarNumSuccess(BaseObjectBean bean,int number,int one_position,int position);
        void onRemoveGoodSuccess(BaseObjectBean bean, String good_id,int position,boolean isAll);
        void onInitDataSuccess(XFDGoodsDetailsBeen bean);
        void onConfirmSuccess(ConfirmGoodBeen bean);

        void getStoreGoodsListSuccess(MoreGoodsBean bean);

        void getGoodsCollectionSuccess(MoreGoodsBean bean);
        void getGoodsCancleCollectionSuccess(MoreGoodsBean bean);

        //关注店铺
        void getFocusShopSuccess(StoreInfoBeen bean);

        void onGetShopRemakeRetailSuccess(ShopRemakeListRetailBean bean);
    }

    interface Presenter {
        /**
         */
        void shopRetail(String shopId);
        void shopStoreInfo(String shopId, String sales_model);
        void addCar(String is_new,String uniqueId,String productId,String cartNum);
        void shopCarList(String store_id,String index_status);
        void updateCarNum(String id,int number,int one_position,int position);
        void removeGood(String  ids,String good_id,int position,boolean isAll);

        void initData(String good_id);
        void confirm(String  cartId,String  user_curent_lng,String  user_curent_lat);

        void getStoreGoodsList(Map<String,Object> map);
        void getGoodsCollection(Map<String,Object> map);
        void getGoodsCancleCollection(Map<String,Object> map);
        void getFocusShop(String storeid);

        void getShopRemakeRetail(Map<String,Object> map);
    }
}
